home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 9 / developer source - volume 9.iso / parad / may96 / clemf104.gif < prev    next >
Graphics Interchange Format  |  1998-02-10  |  9.5 KB  |  518x461  |  4-bit (5 colors)
   ocr: FIND AGE.FSL:Grade School UI Button:Determine Age* method Determine Age(const Date0fBirth Date, const AgeunThisDay Date) Smallint var Age Smallint endvar - Implement the algorithm here - This produces the person's age on their birthday Age = year(AgeunTnisDay) - year(DateUfbirth) Subtract 1 if date in question is before the birthday - if nontn(AgeunTnisDay) < montn(Dateufbirth) then Age = Age - 1 else if nontn(AgeunTnisDay) = montn(Dateufbirth) and day(ageunThisDay) < day(Date0fBirth) then Age = Age - - 1 endif endif return Age endmethod Edit Line: 1 Col: 1